package ooday04;

/**
 * 说明:
 *
 * @author: luohaowei
 * @date:2023/2/24
 **/
import java.util.Timer;
import java.util.TimerTask;

public class TimerDemo {
    public static void main(String[] args) {
        Timer timer=new Timer();
        int interval=1000;
        timer.schedule(new TimerTask() {
                
            public void run() {

            }


        },interval,interval);
        /*
        import java.util.Timer;
import java.util.TimerTask;

public class TimerDemo {
    public static void main(String[] args) {
        Timer timer=new Timer();
        int interval=1000;
        timer.schedule(new TimerTask() {

            public void run() {

            }


        },interval,interval);
         */






















//        Timer timer =new Timer();
//        int interval =1000;
//        timer.schedule(new TimerTask() {
//            public void run() {
//                System.out.println("吃饭了");
//            }
//        }, interval,interval);
    }
}
